import Vue from 'vue'
import Router from 'vue-router'
import App from '../App'

Vue.use(Router)


//路由懒加载
const index = () => import('@/page/index/index')
const channel = () => import('@/page/index/children/channel')
const search = () => import('@/page/search/search')
export default new Router({
  routes: [
    {
      path:'',
      redirect:'/index',
      component:App,
      children:[
        {
          name:'index',
          path:'/index',
          component:index,
          children:[
            {
              name:'channel',
              path:'channel',
              component:channel
            }
          ]
        },
      ]
    },
    //search页面
    {
      name:'search',
      path:'/search',
      component:search

    }
  ]
})
